Waits for events to be available, with optional timeout in milliseconds.
Invokes callbacks for all file descriptors on which an event occurred.
If the timeout is zero, returns immediately without blocking.
If the timeout is negative, waits indefinitely until an event appears.
Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before
the timeout expired and no callbacks were invoked and no other file
descriptors were ready.
Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.
Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
timeout expired.
Returns ALOOPER_POLL_ERROR if an error occurred.
Returns a value >= 0 containing an identifier (the same identifier
ident passed to ALooper_addFd()) if its file descriptor has data
and it has no callback function (requiring the caller here to
handle it). In this (and only this) case outFd, outEvents and
outData will contain the poll events and data associated with the
fd, otherwise they will be set to NULL.
This method does not return until it has finished invoking the appropriate callbacks
for all file descriptors that were signalled.
Waits for events to be available, with optional timeout in milliseconds. Invokes callbacks for all file descriptors on which an event occurred.
If the timeout is zero, returns immediately without blocking. If the timeout is negative, waits indefinitely until an event appears.
Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before the timeout expired and no callbacks were invoked and no other file descriptors were ready.
Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.
Returns ALOOPER_POLL_TIMEOUT if there was no data before the given timeout expired.
Returns ALOOPER_POLL_ERROR if an error occurred.
Returns a value >= 0 containing an identifier (the same identifier ident passed to ALooper_addFd()) if its file descriptor has data and it has no callback function (requiring the caller here to handle it). In this (and only this) case outFd, outEvents and outData will contain the poll events and data associated with the fd, otherwise they will be set to NULL.
This method does not return until it has finished invoking the appropriate callbacks for all file descriptors that were signalled.